<template>
  <div>
    <div class="row  justify-content pt-0 pl-1">
      <form>
        <div v-for="item in cols" class="form-group">
          <label for="exampleInputEmail1">{{item.title}}</label>
          <input type="text" class="form-control" v-model="money">
        </div>
        <div class="row pt-5">
          <div class="col-lg-12 col-md-12 col-sm-12  col-12">
            <button v-for="act in action" type="button" class="btn btn-primary btn-md" @click="act.fn(money)">
              {{action.title}}
            </button>
          </div>
        </div>
      </form>
    </div>
  </div>
</template>

<script>
  export default {
    name: "modal",
    data() {
      return {
        info:[],
        money:''
      }
    },
    
    props: {
      cols: {
        type: Array,
        required: true,
      },
      action:{
        type: Array,
        required: true,
      }
    },
    
    methods: {
    },
    
    mounted() {
      $.each(this.cols, function(index,val) {
        console.log(val.value);
        this.money = val.value;
        console.log(this.money);
      });
      //dump(this.cols);
    },
    watch: {
      val(val, old) {
        console.log(old);
    
      }
    }
  }
</script>

<style scoped>

</style>
